package com.ruoyi.goods.domain;

import java.math.BigDecimal;

import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 商品信息对象 wdm_goods
 * 
 * @author ruoyi
 * @date 2025-06-01
 */
@Data
public class Goods extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 商品ID */
    private Long goodsId;

    /** 商品分类ID */
    @Excel(name = "商品分类ID")
    private Long categoryId;

    /** 商品名称 */
    @Excel(name = "商品名称")
    private String goodsName;

    /** 商品编码(SKU) */
    @Excel(name = "商品编码(SKU)")
    private String goodsCode;

    /** 商品主图 */
    @Excel(name = "商品主图")
    private String imgUrl;

    /** 商品描述 */
    @Excel(name = "商品描述")
    private String description;

    /** 原价 */
    @Excel(name = "原价")
    private BigDecimal price;

    /** 售价 */
    @Excel(name = "售价")
    private BigDecimal salePrice;

    /** 折扣率 */
    @Excel(name = "折扣率")
    private BigDecimal discountValue;

    /** 总库存 */
    @Excel(name = "总库存")
    private Long totalStock;

    /** 销量 */
    @Excel(name = "销量")
    private Long salesVolume;

    /** 状态 */
    @Excel(name = "状态")
    private String status;

    /** 删除 */
    private String delFlag;

    /** 版本号（乐观锁） */
    private Long version;

    /** 标记信息 */
    private String tags;

    /** 商家id */
    private Long merchantId;

    /** 商品详情内容 */
    @Excel(name = "商品详情内容")
    private String detailContent;

    /** 图文详情图片 */
    @Excel(name = "图文详情图片")
    private String detailImages;

    /** 订购须知内容 */
    @Excel(name = "订购须知内容")
    private String purchaseNotes;

    /** 商品规格 */
    @Excel(name = "商品规格")
    private String specifications;

    /** 商品分类
     *  关联商品分类名称
     *  需要创建get和set方法
     * */
    private String categoryName;



    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("goodsId", getGoodsId())
            .append("categoryId", getCategoryId())
            .append("goodsName", getGoodsName())
            .append("goodsCode", getGoodsCode())
            .append("imgUrl", getImgUrl())
            .append("description", getDescription())
            .append("price", getPrice())
            .append("salePrice", getSalePrice())
            .append("discountValue", getDiscountValue())
            .append("totalStock", getTotalStock())
            .append("salesVolume", getSalesVolume())
            .append("status", getStatus())
            .append("delFlag", getDelFlag())
            .append("version", getVersion())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("createBy", getCreateBy())
            .append("updateBy", getUpdateBy())
            .append("remark", getRemark())
            .append("tags", getTags())
            .append("detailContent", getDetailContent())
            .append("detailImages", getDetailImages())
            .append("purchaseNotes", getPurchaseNotes())
            .append("specifications", getSpecifications())
            .toString();
    }
}
